<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Dashboard.aspx.cs" Inherits="Dashboard" Title="Dashboard" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Work Organizer - Dashboard</title>
    <link href="css/cupertino/jquery-ui-1.7.3.custom.css" rel="stylesheet" type="text/css" />
    <link href="fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css" />
    <script src="jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="jquery/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
    <script src="jquery/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script>
    <script src="fullcalendar/fullcalendar.min.js" type="text/javascript"></script>
    <script src="jquery/calendarscript.js" type="text/javascript"></script>
    <script src="jquery/jquery-ui-timepicker-addon-0.6.2.min.js" type="text/javascript"></script>
    <style type='text/css'>
        body
        {
            text-align: center;
            font-size: 12px;
            font-family: "Lucida Grande" ,Helvetica,Arial,Verdana,sans-serif;
        }
        #calendar
        {
            width: 650px;
            margin: 0 auto;
        }
        /* css for timepicker */.ui-timepicker-div dl
        {
            text-align: left;
        }
        .ui-timepicker-div dl dt
        {
            height: 25px;
        }
        .ui-timepicker-div dl dd
        {
            margin: -25px 0 10px 65px;
        }
        .style1
        {
            width: 100%;
        }
        /* table fields alignment*/.alignRight
        {
            text-align: right;
            padding-right: 10px;
            padding-bottom: 3px;
        }
        .alignLeft
        {
            text-align: left;
            padding-bottom: 3px;
        }
    </style>
    <script type="text/javascript">
        window.onload = function () {
            PageMethods.GetDaysEvents(new Date(), GetDaysEventsSuccess);
            document.getElementById('lblDate').innerHTML = new Date().toDateString();
        };

        function GetDaysEventsSuccess(updateResult) {
            if (updateResult != null) {
                //alert(updateResult);
                var mainsplit = updateResult.split("#");
                for (var i = 0; i < mainsplit.length; i++) {
                    var subsplit = mainsplit[i];
                    subsplit = subsplit.substring(1, subsplit.length - 1);
                    add("button", subsplit);
                }
            }
        }

        function add(type, appnt) {
            if (appnt != null) {
                var objvals = appnt.split("^");
                var f_appntid = objvals[0].split(":")[1]; // id
                var f_appnttitle = objvals[1].split(":")[1]; // title
                var f_start = objvals[2].split(":")[1]; // start
                var f_end = objvals[3].split(":")[1]; // end
                var f_appntallDay = objvals[4].split(":")[1]; // allDay
                var f_appntdescription = objvals[5].split(":")[1]; // description
                var f_appntcompanyname = objvals[6].split(":")[1]; // companyname
                var f_appntgroupname = objvals[7].split(":")[1]; // groupname
                var f_appntusers = objvals[8].split(":")[1]; // users

                var f_appntstart = new Date(f_start * 1000);
                var f_appntend = new Date(f_end * 1000);

                f_appntid = f_appntid.substring(2, f_appntid.length - 1);
                f_appnttitle = f_appnttitle.substring(2, f_appnttitle.length - 1);
                f_appntdescription = f_appntdescription.substring(2, f_appntdescription.length - 1);
                f_appntcompanyname = f_appntcompanyname.substring(2, f_appntcompanyname.length - 1);
                f_appntgroupname = f_appntgroupname.substring(2, f_appntgroupname.length - 1);
                f_appntusers = f_appntusers.substring(2, f_appntusers.length - 1);

                //Create an input type dynamically.
                var element = document.createElement("input");

                //Assign different attributes to the element.
                element.setAttribute("type", type);
                element.setAttribute("value", f_appnttitle);
                element.setAttribute("name", type);
                element.setAttribute("tooltip", f_appntdescription);
                element.style.fontSize = "medium";
                element.style.width = "190px";
                element.style.height = "40px";
                element.setAttribute('onclick', 'openupdatedialog(f_appntid,f_appnttitle,f_appntstart,f_appntend,f_appntallDay,f_appntdescription,f_appntcompanyname,f_appntgroupname,f_appntusers);'); // for FF
                element.onclick = function () { openupdatedialog(f_appntid, f_appnttitle, f_appntstart, f_appntend, f_appntallDay, f_appntdescription, f_appntcompanyname, f_appntgroupname, f_appntusers); }; // for IE

                //Append the element in page (in div).
                document.getElementById("appnts").appendChild(element);

            }
        }

        function openupdatedialog(f_appntid, f_appnttitle, f_appntstart, f_appntend, f_appntallDay, f_appntdescription, f_appntcompanyname, f_appntgroupname, f_appntusers) {
            currentUpdateEvent = new Object();
            currentUpdateEvent.id = f_appntid;

            $('#updatedialog').dialog('open');
            $("#eventName").val(f_appnttitle);
            $("#eventDesc").val(f_appntdescription);
            $("#eventId").val(f_appntid);
            $("#ctl00_ContentPlaceHolder1_eventCompanies").val(f_appntcompanyname);
            $("#ctl00_ContentPlaceHolder1_eventGroups").val("");
            $("#ctl00_ContentPlaceHolder1_eventGroups").val(f_appntgroupname);
            updatedUsers = f_appntusers.toString().split(",");
            $("#ctl00_ContentPlaceHolder1_eventUsers").val("");

            PageMethods.PopulateUpdateUsers(f_appntgroupname, updateUserPopulationSuccess);
            PageMethods.PopulateAddCustomerRelatedFields(f_appntcompanyname, updateCustomerDetailsPopulationSuccess);

            $("#eventStart").text("" + f_appntstart.toLocaleString());

            if (f_appntend == null) {
                $("#eventEnd").text("");
            }
            else {
                $("#eventEnd").text("" + f_appntend.toLocaleString());
                var t1 = f_appntstart.format("HH:mm");
                var t2 = f_appntend.format("HH:mm");

                var sth = t1.toString().split(":")[0];
                var stm = t1.toString().split(":")[1];
                var eth = t2.toString().split(":")[0];
                var etm = t2.toString().split(":")[1];

                $("#ctl00_ContentPlaceHolder1_updateStartTimeHour").val(sth.toString());
                $("#ctl00_ContentPlaceHolder1_updateStartTimeMin").val(stm.toString());
                $("#ctl00_ContentPlaceHolder1_updateEndTimeHour").val(eth.toString());
                $("#ctl00_ContentPlaceHolder1_updateEndTimeMin").val(etm.toString());

            }
        }

        function addEmails() {
            var sel = document.getElementById("ctl00_ContentPlaceHolder1_addUsers");
            var listLength = sel.options.length;
            for (var i = 0; i < listLength; i++) {
                if (sel.options[i].selected) {
                    var mails = document.getElementById("ctl00_ContentPlaceHolder1_addMails");
                    var optionToBeCopied = sel.options[i].value;
                    var contains = false;
                    for (var j = 0, ceiling = mails.options.length; j < ceiling; j++) {
                        if (mails.options[j].value == optionToBeCopied) {
                            contains = true;
                            break;
                        }
                    }
                    if (!contains){
                        document.getElementById("ctl00_ContentPlaceHolder1_addMails").add(new Option(optionToBeCopied));
                    }
                }
            }

            var extraMailId = document.getElementById("addExtraMailId");

            if (extraMailId != null && extraMailId.value != null && extraMailId.value != '') {
                document.getElementById("ctl00_ContentPlaceHolder1_addMails").add(new Option(extraMailId.value));
            }
            sel.disabled = true;
        }

        function updateEmails() {
            var sel = document.getElementById("ctl00_ContentPlaceHolder1_eventUsers");
            var listLength = sel.options.length;
            for (var i = 0; i < listLength; i++) {
                if (sel.options[i].selected) {
                    var mails = document.getElementById("ctl00_ContentPlaceHolder1_eventMails");
                    var optionToBeCopied = sel.options[i].value;
                    var contains = false;
                    for (var j = 0, ceiling = mails.options.length; j < ceiling; j++) {
                        if (mails.options[j].value == optionToBeCopied) {
                            contains = true;
                            break;
                        }
                    }
                    if (!contains) {
                        document.getElementById("ctl00_ContentPlaceHolder1_eventMails").add(new Option(optionToBeCopied));
                    }
                }
            }

            var extraMailId = document.getElementById("eventExtraMailId");

            if (extraMailId != null && extraMailId.value != null && extraMailId.value != '') {
                document.getElementById("ctl00_ContentPlaceHolder1_eventMails").add(new Option(extraMailId.value));
            }
            sel.disabled = true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
    </asp:ScriptManager>
    <table style="width: 880px;">
        <tr>
            <td style="width: 680px;">
                <div id="calendar">
                </div>
            </td>
            <td class="rightAppnts">
                <div class="rightHeader">
                    Appointments<br />
                    <span id="lblDate" style="font-weight: bold; font-size: 20px; color: #ff6600;"></span>
                </div>
                <div id="appnts">
                </div>
            </td>
        </tr>
    </table>
    <div id="updatedialog" style="font: 60% 'Trebuchet MS', sans-serif; margin: 5px;"
        title="Update or Delete Appointment">
        <table cellpadding="0">
            <tr>
                <td class="alignRight">
                    name:
                </td>
                <td class="alignLeft">
                    <input id="eventName" type="text" size="50" style="width: 150px" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    location/remarks:
                </td>
                <td class="alignLeft">
                    <textarea id="eventDesc" cols="30" rows="2"></textarea>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    company name:
                </td>
                <td class="alignLeft">
                    <%--<input id="eventCompany" type="text" size="50" style="width: 150px" />--%><br />
                    <asp:ListBox ID="eventCompanies" runat="server" onchange="populateUpdateCompanies();">
                    </asp:ListBox>
                    <br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    address:
                </td>
                <td class="alignLeft">
                    <input id="eventAddress" type="text" size="50" style="width: 150px" readonly="readonly" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    contact person:
                </td>
                <td class="alignLeft">
                    <input id="eventContactPerson" type="text" size="50" style="width: 150px" readonly="readonly" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    contact number:
                </td>
                <td class="alignLeft">
                    <input id="eventContactNumber" type="text" size="50" style="width: 150px" readonly="readonly" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    Group:
                </td>
                <td class="alignLeft">
                    <asp:ListBox ID="eventGroups" runat="server" onchange="populateUpdateUsers();"></asp:ListBox>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    User names:
                </td>
                <td class="alignLeft">
                    <asp:ListBox ID="eventUsers" runat="server" SelectionMode="Multiple"></asp:ListBox>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    Authority mail:
                </td>
                <td class="alignLeft">
                    <input id="eventExtraMailId" type="text" size="50" style="width: 150px" /><br />
                    <div>
                    <input id="btnUpdateEmails" type="button" style="width: 100px" value="Add Users" onclick="updateEmails();" />(Select and click on "Add Users" to add them into mailing list below.)
                    </div>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    start:
                </td>
                <td class="alignLeft">
                    <span id="eventStart"></span>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    end:
                </td>
                <td class="alignLeft">
                    <span id="eventEnd"></span>
                    <input type="hidden" id="eventId" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <table>
                        <tr>
                            <td class="alignRight">
                                start:
                            </td>
                            <td class="alignLeft">
                                <select id="updateStartTimeHour" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                </select>
                                &nbsp;:&nbsp;
                                <select id="updateStartTimeMin" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                    <option value="24">24</option>
                                    <option value="25">25</option>
                                    <option value="26">26</option>
                                    <option value="27">27</option>
                                    <option value="28">28</option>
                                    <option value="29">29</option>
                                    <option value="30">30</option>
                                    <option value="31">31</option>
                                    <option value="32">32</option>
                                    <option value="33">33</option>
                                    <option value="34">34</option>
                                    <option value="35">35</option>
                                    <option value="36">36</option>
                                    <option value="37">37</option>
                                    <option value="38">38</option>
                                    <option value="39">39</option>
                                    <option value="40">40</option>
                                    <option value="41">41</option>
                                    <option value="42">42</option>
                                    <option value="43">43</option>
                                    <option value="44">44</option>
                                    <option value="45">45</option>
                                    <option value="46">46</option>
                                    <option value="47">47</option>
                                    <option value="48">48</option>
                                    <option value="49">49</option>
                                    <option value="50">50</option>
                                    <option value="51">51</option>
                                    <option value="52">52</option>
                                    <option value="53">53</option>
                                    <option value="54">54</option>
                                    <option value="55">55</option>
                                    <option value="56">56</option>
                                    <option value="57">57</option>
                                    <option value="58">58</option>
                                    <option value="59">59</option>
                                </select>
                            </td>
                            <td class="alignRight">
                                end:
                            </td>
                            <td class="alignLeft">
                                <select id="updateEndTimeHour" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                </select>
                                &nbsp;:&nbsp;
                                <select id="updateEndTimeMin" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                    <option value="24">24</option>
                                    <option value="25">25</option>
                                    <option value="26">26</option>
                                    <option value="27">27</option>
                                    <option value="28">28</option>
                                    <option value="29">29</option>
                                    <option value="30">30</option>
                                    <option value="31">31</option>
                                    <option value="32">32</option>
                                    <option value="33">33</option>
                                    <option value="34">34</option>
                                    <option value="35">35</option>
                                    <option value="36">36</option>
                                    <option value="37">37</option>
                                    <option value="38">38</option>
                                    <option value="39">39</option>
                                    <option value="40">40</option>
                                    <option value="41">41</option>
                                    <option value="42">42</option>
                                    <option value="43">43</option>
                                    <option value="44">44</option>
                                    <option value="45">45</option>
                                    <option value="46">46</option>
                                    <option value="47">47</option>
                                    <option value="48">48</option>
                                    <option value="49">49</option>
                                    <option value="50">50</option>
                                    <option value="51">51</option>
                                    <option value="52">52</option>
                                    <option value="53">53</option>
                                    <option value="54">54</option>
                                    <option value="55">55</option>
                                    <option value="56">56</option>
                                    <option value="57">57</option>
                                    <option value="58">58</option>
                                    <option value="59">59</option>
                                </select>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    Please select the users to mail:
                </td>
                <td class="alignLeft">
                    <asp:ListBox ID="eventMails" runat="server" SelectionMode="Multiple"></asp:ListBox>
                </td>
            </tr>
        </table>
    </div>
    <div id="addDialog" style="font: 60% 'Trebuchet MS', sans-serif; margin: 5px;" title="Add Appointment">
        <table cellpadding="0" class="style1" id="tblAddGroup">
            <tr>
                <td class="alignRight">
                    name:
                </td>
                <td class="alignLeft">
                    <input id="addEventName" type="text" size="50" style="width: 150px" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    location/remarks:
                </td>
                <td class="alignLeft">
                    <textarea id="addEventDesc" cols="30" rows="2"></textarea>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    company name:
                </td>
                <td class="alignLeft">
                    <%--<input id="addCompanyName" type="text" size="50" style="width: 150px" />--%>
                    <asp:ListBox ID="addCompanies" runat="server" onchange="populateAddCompanies();">
                    </asp:ListBox>
                    <br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    address:
                </td>
                <td class="alignLeft">
                    <input id="addAddress" type="text" size="50" style="width: 150px" readonly="readonly" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    contact person:
                </td>
                <td class="alignLeft">
                    <input id="addContactPerson" type="text" size="50" style="width: 150px" readonly="readonly" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    contact number:
                </td>
                <td class="alignLeft">
                    <input id="addContactNumber" type="text" size="50" style="width: 150px" readonly="readonly" /><br />
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    Group:
                </td>
                <td class="alignLeft">
                    <asp:ListBox ID="addGroups" runat="server" onchange="populateAddUsers();"></asp:ListBox>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    User names:
                </td>
                <td class="alignLeft">
                    <asp:ListBox ID="addUsers" runat="server" SelectionMode="Multiple">
                    </asp:ListBox>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    Authority mail:
                </td>
                <td class="alignLeft">
                    <input id="addExtraMailId" type="text" size="50" style="width: 150px" /><br />
                    <div>
                    <input id="btnAddEmails" type="button" style="width: 100px" value="Add Users" onclick="addEmails();" />(Select and click on "Add Users" to add them into mailing list below.)
                    </div>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    start:
                </td>
                <td class="alignLeft">
                    <span id="addEventStartDate"></span>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    end:
                </td>
                <td class="alignLeft">
                    <span id="addEventEndDate"></span>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <table>
                        <tr>
                            <td class="alignRight">
                                start:
                            </td>
                            <td class="alignLeft">
                                <select id="addStartTimeHour" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                </select>
                                &nbsp;:&nbsp;
                                <select id="addStartTimeMin" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                    <option value="24">24</option>
                                    <option value="25">25</option>
                                    <option value="26">26</option>
                                    <option value="27">27</option>
                                    <option value="28">28</option>
                                    <option value="29">29</option>
                                    <option value="30">30</option>
                                    <option value="31">31</option>
                                    <option value="32">32</option>
                                    <option value="33">33</option>
                                    <option value="34">34</option>
                                    <option value="35">35</option>
                                    <option value="36">36</option>
                                    <option value="37">37</option>
                                    <option value="38">38</option>
                                    <option value="39">39</option>
                                    <option value="40">40</option>
                                    <option value="41">41</option>
                                    <option value="42">42</option>
                                    <option value="43">43</option>
                                    <option value="44">44</option>
                                    <option value="45">45</option>
                                    <option value="46">46</option>
                                    <option value="47">47</option>
                                    <option value="48">48</option>
                                    <option value="49">49</option>
                                    <option value="50">50</option>
                                    <option value="51">51</option>
                                    <option value="52">52</option>
                                    <option value="53">53</option>
                                    <option value="54">54</option>
                                    <option value="55">55</option>
                                    <option value="56">56</option>
                                    <option value="57">57</option>
                                    <option value="58">58</option>
                                    <option value="59">59</option>
                                </select>
                            </td>
                            <td class="alignRight">
                                end:
                            </td>
                            <td class="alignLeft">
                                <select id="addEndTimeHour" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                </select>
                                &nbsp;:&nbsp;
                                <select id="addEndTimeMin" runat="server">
                                    <option value="00">00</option>
                                    <option value="01">01</option>
                                    <option value="02">02</option>
                                    <option value="03">03</option>
                                    <option value="04">04</option>
                                    <option value="05">05</option>
                                    <option value="06">06</option>
                                    <option value="07">07</option>
                                    <option value="08">08</option>
                                    <option value="09">09</option>
                                    <option value="10">10</option>
                                    <option value="11">11</option>
                                    <option value="12">12</option>
                                    <option value="13">13</option>
                                    <option value="14">14</option>
                                    <option value="15">15</option>
                                    <option value="16">16</option>
                                    <option value="17">17</option>
                                    <option value="18">18</option>
                                    <option value="19">19</option>
                                    <option value="20">20</option>
                                    <option value="21">21</option>
                                    <option value="22">22</option>
                                    <option value="23">23</option>
                                    <option value="24">24</option>
                                    <option value="25">25</option>
                                    <option value="26">26</option>
                                    <option value="27">27</option>
                                    <option value="28">28</option>
                                    <option value="29">29</option>
                                    <option value="30">30</option>
                                    <option value="31">31</option>
                                    <option value="32">32</option>
                                    <option value="33">33</option>
                                    <option value="34">34</option>
                                    <option value="35">35</option>
                                    <option value="36">36</option>
                                    <option value="37">37</option>
                                    <option value="38">38</option>
                                    <option value="39">39</option>
                                    <option value="40">40</option>
                                    <option value="41">41</option>
                                    <option value="42">42</option>
                                    <option value="43">43</option>
                                    <option value="44">44</option>
                                    <option value="45">45</option>
                                    <option value="46">46</option>
                                    <option value="47">47</option>
                                    <option value="48">48</option>
                                    <option value="49">49</option>
                                    <option value="50">50</option>
                                    <option value="51">51</option>
                                    <option value="52">52</option>
                                    <option value="53">53</option>
                                    <option value="54">54</option>
                                    <option value="55">55</option>
                                    <option value="56">56</option>
                                    <option value="57">57</option>
                                    <option value="58">58</option>
                                    <option value="59">59</option>
                                </select>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="alignRight">
                    Please select the users to mail:
                </td>
                <td class="alignLeft">
                    <asp:ListBox ID="addMails" runat="server" SelectionMode="Multiple"></asp:ListBox>
                </td>
            </tr>
        </table>
    </div>
    <div runat="server" id="jsonDiv" />
    <input type="hidden" id="hdClient" runat="server" />
</asp:Content>
